<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page isELIgnored="false" %>
<html>
<head>
    <title>修改</title>
    <script type="text/javascript" src="/js/jquery.min.js"></script>

    <script>
        $(function () {

            $("#updateSubmit").bind("click",function () {
                // alert('add');
                var id = $("#id").val()
                var name = $("#name").val()
                var phone = $("#phone").val()
                var address = $("#address").val()
                // 发送ajax请求
                $.ajax({
                    url: '/test/update',
                    type: 'POST',
                    data: '{"name":"'+name+'","phone":"'+phone+'","id":'+id+',"address":"'+address+'"}',
                    contentType: 'application/json;charset=utf-8',
                    dataType: 'json',
                    success: function () {
                        window.location.href="./resume"
                    }
                })
            })
        })
    </script>
</head>
<body>

    id:<input id="id" type="text" name="id" disabled value="${resume.id}" />
    <br>
    姓名：<input id="name" type="text" name="name" value="${resume.name}" />
    <br>
    电话：<input id="phone" type="text" name="phone" value="${resume.phone}"/>
    <br>
    地址：<input id="address" type="text" name="address" value="${resume.address}"/>
    <button id="updateSubmit" type="submit" >修改</button>
</body>
</html>
